{extend name="base/index"/}

{block name="page_location"}
<div class="row">
	<div class="col-12">
		<div class="page-title-box">
			<div class="page-title-right">
				<ol class="breadcrumb m-0">
					<li class="breadcrumb-item"><a href="{:url('index/index')}">管理中心</a></li>
					<li class="breadcrumb-item active"><i class="iconfont icon-angle-right"></i>广告管理</li>
				</ol>
			</div>
			<h4 class="page-title">
            	{eq name='act' value='edit'}
            		编辑广告
            	{else /}
            		发布广告
            	{/eq}
			</h4>
		</div>
	</div>
</div>
{/block}

{block name="body"}     
<div class="row" id="ad_publish_page">
	<div class="col-12">
		<div class="card">
			<div class="card-body">
				<form action="#" class="form-horizontal" id="edit_ad_frm">
                	<input type="hidden" name="id" value="{$id}" />
                    <div class="form-group row mb-1">
                        <label class="col-3 col-form-label">选择分类：</label>
                        <div class="col-5">
                            <select class="form-control" tabindex="1" name="classid">
								{volist name="classlist" id="data"}
									<option value="{$data.id}">{$data.classname}</option>
								{/volist}
                            </select>
                        </div>
                    </div>
                    <div class="form-group row mb-1">
                        <label class="col-3 col-form-label">广告编号：</label>
                        <div class="col-5">
                            <input type="text" name="aid" placeholder="请输入广告编号，例：A1010" class="form-control ipt_check" data-type="name" data-len="1-100" nullmsg="幻灯片标题不能为空" errormsg="幻灯片标题由1-100个中英文字符组成！"  value="">
                            <span class="font-13 text-muted"><span class="label label-important"> 必填</span></span>
                        </div>
                    </div>
                    <div class="form-group row mb-1">
                        <label class="col-3 col-form-label">广告标题：</label>
                        <div class="col-5">
                            <input type="text" name="title" placeholder="请输入广告标题" class="form-control">
                        </div>
                    </div>
                    <div class="form-group row mb-1">
                        <label class="col-3 col-form-label">广告链接地址：</label>
                        <div class="col-5">
                            <input type="text" name="linkurl" placeholder="请输入广告链接地址" class="form-control">
                        </div>
                    </div>
                    <div class="form-group row mb-1">
                        <label class="col-3 col-form-label">广告备注：</label>
                        <div class="col-5">
                            <input type="text" name="remark" placeholder="请输入广告备注" class="form-control" value="">
                        </div>
                    </div>
                    <div class="form-group row mb-1">
	                    <label class="col-3 col-form-label">广告类型：</label>
	                    <div class="col-5">
							<div class="custom-control custom-radio">
								<input type="radio" name="type" id="type1" class="custom-control-input" value="1" checked="checked">
								<label class="custom-control-label" for="type1">简单文本广告</label>
							</div>
							<div class="custom-control custom-radio">
								<input type="radio" name="type" id="type2" class="custom-control-input" value="2">
								<label class="custom-control-label" for="type2">编辑器广告</label>
							</div>
							<div class="custom-control custom-radio">
								<input type="radio" name="type" id="type3" class="custom-control-input" value="3">
								<label class="custom-control-label" for="type3">单个图片广告</label>
							</div>
							<div class="custom-control custom-radio">
								<input type="radio" name="type" id="type4" class="custom-control-input" value="4">
								<label class="custom-control-label" for="type4">多个图片广告</label>
							</div>
							<div class="custom-control custom-radio">
								<input type="radio" name="type" id="type5" class="custom-control-input" value="5">
								<label class="custom-control-label" for="type5">代码广告</label>
							</div>
	                    </div>
	                </div>
                    <div class="form-group row mb-1 ad_type ad_type_1">
                        <label class="col-3 col-form-label">简单文本广告：</label>
                        <div class="col-5">
                           <textarea class="form-control text_edit" rows="5" name="text"></textarea>
                        </div>
                    </div>
                    <div class="form-group row mb-1 ad_type ad_type_2">
                        <label class="col-3 col-form-label">文章内容：</label>
                        <div class="col-5">
							<textarea id="editer" name="editer"></textarea>
                        </div>
                    </div>
	                <div class="form-group row mb-1 ad_type ad_type_3">
	                    <label class="col-3 col-form-label">单图片广告：</label>
	                    <div class="col-5 picurl_pc_box">
		                    <div class="picurl" attr-inputname="picurl" attr-value=""  isCompress="1"></div>
	                    </div>
	                </div>
	                <div class="form-group row mb-1 ad_type ad_type_4">
	                    <label class="col-3 col-form-label">多图片广告：</label>
	                    <div class="col-5 picurl_pc_box">
		                    <div class="picarr" attr-inputname="picarr" attr-value=""  isCompress="1"></div>
	                    </div>
	                </div>   
                    <div class="form-group row mb-1 ad_type ad_type_5">
                        <label class="col-3 col-form-label">广告代码：</label>
                        <div class="col-5">
                           <textarea class="form-control code_edit" rows="5" name="code"></textarea>
                        </div>
                    </div>
                    <div class="form-group row mb-1">
                        <label class="col-3 col-form-label">广告排序：</label>
                        <div class="col-2">
                            <input type="number" name="orderid" placeholder="请输入广告排序" class="form-control small" value="{$orderid}">
                        </div>
                    </div>
	                <div class="form-group row mb-1">
	                    <label class="col-3 col-form-label">是否显示：</label>
	                    <div class="col-5">
							<div class="custom-control custom-radio">
								<input type="radio" name="status" id="status1" class="custom-control-input" value="0" checked="checked">
								<label class="custom-control-label" for="status1">显示</label>
							</div>
							<div class="custom-control custom-radio">
								<input type="radio" name="status" id="status2" class="custom-control-input" value="1">
								<label class="custom-control-label" for="status2">不显示</label>
							</div>
	                    </div>
	                </div> 
                    <div class="form-group row mb-1">
                        <label class="col-3 col-form-label"></label>
                        <div class="col-5">
                            <button type="button" class="btn btn-primary Fast_Form_Post" attr-frm="#edit_ad_frm" attr-callback="back" attr-model="ad" attr-active="save_ad">保存</button>
                        </div>
                    </div>					
                </form>
			</div>
		</div>	
	</div>
</div>					

{/block}
{block name="script"}
<script src="__PLUGIN__/ueditor/ueditor.config.js" type="text/javascript" ></script>
<script src="__PLUGIN__/ueditor/ueditor.all.min.js" type="text/javascript" ></script>  
{/block}